﻿<%@ Page Language="C#" AutoEventWireup="true" CodeBehind="DimondTransfer.aspx.cs" Inherits="Yule8xWechat.Dimond.DimondTransfer" %>

<!DOCTYPE html>
<html>

<head>
    <meta charset="utf-8" />
    <meta name="viewport" content="width=device-width,initial-scale=1,minimum-scale=1,maximum-scale=1,user-scalable=no" />
    <title>钻石转入游戏</title>
    <link rel="stylesheet" type="text/css" href="/Skin/Theme/Css/comm.css" />
    <link rel="stylesheet" type="text/css" href="/Skin/Theme/Css/icon.css" />
    <link rel="stylesheet" type="text/css" href="/Skin/Theme/Css/my.css" />
    <link rel="stylesheet" type="text/css" href="/Skin/Theme/Css/agent.css" />
    <script src="/Skin/Theme/Js/flexible_css.js" type="text/javascript" charset="utf-8"></script>
    <script src="/Skin/Theme/Js/flexible.js" type="text/javascript" charset="utf-8"></script>
    <script src="/Skin/Theme/Js/jquery_2.1.3.js" type="text/javascript" charset="utf-8"></script>
    <script src="/Skin/Plugins/DialogLib/layer-v3.0.1/layer.js" type="text/javascript"></script>
</head>
<body>
    <div class="content">
        <!--赠卡事项-->
        <div class="regagenttip">
            <div class="tiptext">钻石转入游戏说明:代理可通过输入游戏ID将钻石转入玩家游戏账户<!--，<a class="t-r">代理与代理之间无法转让</a>--></div>
        </div>

        <!--赠送对象信息-->
        <form method="post" action="DimondTransfer.aspx?user_id=<%=user_id %>">
            <div class="choosegame">
                <div class="choosetext">请选择游戏</div>
                <div class="gameicon">
                    <span class="iconp">
                        <img id="bozhongicon" src="/Skin/Theme/Images/my/btn_05.png"></span>
                    <span class="iconp">
                        <img id="wanghuicon" src="/Skin/Theme/Images/my/btngray_03.png"></span>
                </div>
            </div>

            <!--隐藏文本域-->
            <input type="hidden" name="game_mact_id" id="game_mact_id" value="1" />
            <div class="baseinfo">
                <ul>
                    <li>
                        <div class="basetext">
                            <span class="anameicon">
                                <img src="/Skin/Theme/Images/agent/agentname.png"></span><span class="anametext">游	戏	ID</span><span class="anameinput"><input type="text" id="game_id" name="game_id" data-bozhong="<%=game_id_bozhong %>" data-wanghu="<%=game_id_wanghu %>" placeholder="请输入玩家游戏ID" required="required" value="<%=game_id_bozhong>0?game_id_bozhong.ToString():string.Empty %>" /></span>
                        </div>
                    </li>
                    <li>
                        <div class="basetext">
                            <span class="anameicon">
                                <img src="/Skin/Theme/Images/agent/agentphone.png"></span><span class="anametext">转入数量</span><span class="anameinput"><input type="text" id="number" name="number" placeholder="请输入转入的数量" required="required" data-blance="<%=dimond_blance %>" /></span>
                        </div>
                    </li>
                    <li>
                        <div class="lastcount">当前剩余数量  <a class="t-r"><%=dimond_blance %>颗</a></div>
                    </li>
                </ul>
            </div>
            <div class="regagenttip">
                <div class="tiptext">钻石将直接转入<a class="t-r">您选择的游戏及游戏ID（必须有ID）</a></div>
                <div class="tiptext">八星娱乐<a class="t-r">1颗钻石=<%=bozhongrate %>张房卡</a></div>
                <div class="tiptext">八星游戏<a class="t-r">1颗钻石=<%=wanghurate %>颗金豆</a></div>
            </div>

            <!--赠送按钮-->
            <div class="regbutton">
                <span class="regbtn">
                    <button type="submit">确认转入</button></span>
            </div>
            <div class="regbutton"><span class="sendbtn"><a href="History.aspx">钻石转入记录</a></span></div>
            <input type="hidden" name="action" value="submit" />
        </form>
    </div>
    <script type="text/javascript">
        $('#bozhongicon').click(function () {
            $(this).attr('src', '/Skin/Theme/Images/my/btn_05.png');
            $('#wanghuicon').attr('src', '/Skin/Theme/Images/my/btngray_03.png');
            $('#game_mact_id').val(1);
            var game_id_bz = $('#game_id').data('bozhong');
            var game_id_wh = $('#game_id').data('wanghu');
            var value=$('#game_id').val();
            $('#game_id').val(game_id_bz > 0  ? game_id_bz : '');
        })

        $('#wanghuicon').click(function () {
            $('#bozhongicon').attr('src', '/Skin/Theme/Images/my/btngray_05.png');
            $(this).attr('src', '/Skin/Theme/Images/my/btn_03.png');
            $('#game_mact_id').val(2);
            var game_id = $('#game_id').data('wanghu');
            $('#game_id').val(game_id > 0 ? game_id : '');
        })

        $('#number').change(function () {
            var $this = $(this);
            var number = $this.val() * 1;
            var blance = $this.data('blance') * 1;
            if (number > blance) {
                layer.msg('转入数量超过剩余钻石数量!')
                $this.val(blance);
            }
        })
        /*
        $('#game_id').blur(function () {
            var $this = $(this);
            var url = $this.data('url').replace('varkey', $this.val());
            $.get(url, function (data) {
                if (data.length < 0) {
                    layer.msg('游戏ID不存在!');
                    $this.val('');
                }
            })
        })*/
    </script>
</body>
</html>
